package com.ibm.spatiotemp.datamodel.datatype.response;

import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

import com.ibm.spatiotemp.datamodel.result.SpatioObjectResultSet;

public class Response {
	/*todo: add paging ability later for resultset*/
	List<SpatioObjectResultSet> resultset;
	
	public  Response(){
		resultset = new LinkedList<SpatioObjectResultSet>();
	}
	
	public Response(SpatioObjectResultSet res){
		resultset = new LinkedList<SpatioObjectResultSet>();
		this.resultset.add(res);
	}
	
	public void setResultset(Collection<SpatioObjectResultSet> resultset) {
		this.resultset.addAll(resultset);
	}

	public Collection<SpatioObjectResultSet> getResultset(){
		return resultset;
	}
	
	public void mergeResponse(Response tomerge)
	{
		this.resultset.addAll(tomerge.getResultset());
	}
}
